const userModel = require('../model/userModel');

module.exports.insert = async function(user){
   return await userModel.create(user);
}

module.exports.findByUsername = async function(username){
   return await userModel.find({username});
}

module.exports.findByUsernameAndPwd = async function(user){
   
   let data = await userModel.find(user);
  
   return data;
}